//
//  Team9SubjectTableViewCell.m
//  Team9Project
//
//  Created by dllo on 15/10/19.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "Team9SubjectTableViewCell.h"
#import <Masonry.h>

#define WID 375.0
#define HEI 667.0

@implementation Team9SubjectTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    return self;
}


-(void)creatView
{
    self.imageview=[[UIImageView alloc] init];
    [self.contentView addSubview:self.imageview];
    self.imageView.layer.cornerRadius = 10 / WID * WIDTH;
    self.imageView.layer.masksToBounds = YES;
    
    self.labelTitle=[[Team9BaseLabel alloc] init];
    self.labelTitle.textAlignment=NSTextAlignmentCenter;
    self.labelTitle.font=[UIFont systemFontOfSize:25 / WID * WIDTH];
    self.labelTitle.textColor = [UIColor whiteColor];
    
    [self.imageview addSubview:self.labelTitle];
    
    self.labelsubTitle=[[Team9BaseLabel alloc] init];
    self.labelsubTitle.layer.cornerRadius = 5 / WID * WIDTH;
    self.labelsubTitle.layer.masksToBounds = YES;
    self.labelsubTitle.textAlignment = NSTextAlignmentCenter;
    self.labelsubTitle.font = [UIFont systemFontOfSize:14 / WID * WIDTH];
    [self.imageview addSubview:self.labelsubTitle];
 
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageview.frame=CGRectMake(10 / WID * WIDTH, 10 / WID * WIDTH, 355 / WID * WIDTH, 200 / HEI * HEGHT);
    self.labelTitle.frame=CGRectMake(80 / WID * WIDTH, 50 / HEI * HEGHT, 200 / WID * WIDTH, 40 / HEI * HEGHT);
    self.labelsubTitle.frame=CGRectMake(120 / WID * WIDTH, 100 / HEI * HEGHT, 110 / WID * WIDTH, 35 / HEI * HEGHT);
}





@end
